package com.iv.durian.cloud.dao.mapper;

import com.iv.durian.cloud.Lesson;
import com.iv.durian.cloud.LessonContent;
import com.iv.durian.cloud.LessonDetail;
import com.iv.durian.cloud.LessonTimeLine;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by zlw on 2018-07-01.
 */
public interface LessonDetailMapper {

    Lesson get(@Param("id") Integer id, @Param("name") String name);

    LessonContent getLessonContent(@Param("lessonId") Integer lessonId);

    LessonTimeLine getLessonTimeLine(@Param("lessonId") Integer lessonId);

    int addLessonContent(@Param("lessonContent") LessonContent lessonContent);

    int addLessonTimeLine(@Param("lessonTimeLine") LessonTimeLine lessonTimeLine);

    int updateLessonContent(@Param("lessonContent") LessonContent lessonContent);

    int updateLessonTimeLine(@Param("lessonTimeLine") LessonTimeLine lessonTimeLine);

//    List<LessonDetail> list(@Param("lessonId") Integer lessonId,@Param("status") Integer status, @Param("offset") Integer offset, @Param("limit") Integer limit);

    int countLessonContent(@Param("lessonId") Integer lessonId);

    int countLessonTimeLine(@Param("lessonId") Integer lessonId);

    int deleteLessonContent(@Param("lessonId") Integer lessonId);

    int deleteLessonTimeLine(@Param("lessonId") Integer lessonId, @Param("id") Integer id);
}
